package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TlPddMallMapper;
import com.ruoyi.system.domain.TlPddMall;
import com.ruoyi.system.service.ITlPddMallService;

/**
 * 店铺Service业务层处理
 *
 * @author ruoyi
 * @date 2023-11-12
 */
@Service
public class TlPddMallServiceImpl implements ITlPddMallService
{
    @Autowired
    private TlPddMallMapper tlPddMallMapper;

    /**
     * 查询店铺
     *
     * @param id 店铺主键
     * @return 店铺
     */
    @Override
    public TlPddMall selectTlPddMallById(Long id)
    {
        return tlPddMallMapper.selectTlPddMallById(id);
    }

    /**
     * 查询店铺列表
     *
     * @param tlPddMall 店铺
     * @return 店铺
     */
    @Override
    public List<TlPddMall> selectTlPddMallList(TlPddMall tlPddMall)
    {
        return tlPddMallMapper.selectTlPddMallList(tlPddMall);
    }

    /**
     * 新增店铺
     *
     * @param tlPddMall 店铺
     * @return 结果
     */
    @Override
    public int insertTlPddMall(TlPddMall tlPddMall)
    {
        tlPddMall.setCreateTime(DateUtils.getNowDate());
        return tlPddMallMapper.insertTlPddMall(tlPddMall);
    }

    /**
     * 修改店铺
     *
     * @param tlPddMall 店铺
     * @return 结果
     */
    @Override
    public int updateTlPddMall(TlPddMall tlPddMall)
    {
        return tlPddMallMapper.updateTlPddMall(tlPddMall);
    }

    /**
     * 批量删除店铺
     *
     * @param ids 需要删除的店铺主键
     * @return 结果
     */
    @Override
    public int deleteTlPddMallByIds(Long[] ids)
    {
        return tlPddMallMapper.deleteTlPddMallByIds(ids);
    }

    /**
     * 删除店铺信息
     *
     * @param id 店铺主键
     * @return 结果
     */
    @Override
    public int deleteTlPddMallById(Long id)
    {
        return tlPddMallMapper.deleteTlPddMallById(id);
    }

    @Override
    public TlPddMall selectTlPddMallByMallId(Long mallId) {
        return tlPddMallMapper.selectTlPddMallByMallId(mallId);
    }
}
